FROM ubuntu:20.04

# 避免交互式配置
ENV DEBIAN_FRONTEND=noninteractive

# 更新系统并安装Python 3.11
RUN apt-get update && \
    apt-get install -y python3.11 python3-pip python3.11-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 复制服务器代码
COPY server/ ./

# 安装Python依赖
RUN pip3 install -r requirements.txt

# 暴露端口
EXPOSE 9527

# 启动命令
CMD ["python3.11", "server.py"]
